﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="statics/css/login.css" />
    <title>方配考试后台管理系统登出</title>
</head>
<body class="beg-logout-bg">
    <script src="/plugins/layui/layui.js"></script>
    <script type="text/javascript" src="/plugins/common/login.js"></script>
    <script>
        layui.use('form', function(){
        var $ = layui.$;
           $.ajax({
                type: "post",
                url: "/user/logout",
                dataType: "json",
                success: function (data) {
                    if (data.code == 0)
                    {
                        RemoveSession();
                        layer.msg(data.msg, {icon: 1, time: 1000},function(){
                          location.href = "login.html";
                        });
                    }
                    else
                    {
                       layer.alert(data.msg)
                    }
                }
            });
        })
    </script>
</body>
</html>